package com.dnjn.mes.biz.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dnjn.mes.biz.domain.MesWorkpiece;
import com.dnjn.mes.biz.enums.MaintainType;

import java.util.List;

/**
 * <p>
 * 工件 零部件 服务类
 * </p>
 *
 * @author Amber
 * @since 2023-07-26
 */
public interface IMesWorkpieceService extends IService<MesWorkpiece> {

    String importData(List<MesWorkpiece> list,boolean updateSupport) throws Exception;

    MesWorkpiece selectByWorkpieceName(Long assemblyId, String workpieceName);

    MesWorkpiece queryBy(String equipmentName, String assemblyName, String workpieceName);

    List<MesWorkpiece> selectWorkList(MesWorkpiece domain);

    void updateTimeSpentByMaintainType(double durationHour, MaintainType maintainType);

    Long removeWorkById(Long workpieceId);

    List<MesWorkpiece> searchWorkByName(String searchKey, Long assemblyId);

    MesWorkpiece maintenanceCountdown(Long equipmentId);

    boolean maintenanceWork(Long workpieceId);

    void handleWorkpiceTask();

    Integer getMaxOrdinal();
}
